//
//  NavigationViewController.m
//  Demo1
//
//  Created by 胡旭辉 on 2019/7/2.
//  Copyright © 2019 胡旭辉. All rights reserved.
//

#import "NavigationViewController.h"

@interface NavigationViewController ()

@end

@implementation NavigationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//
//    UIImage     *image = [UIImage imageNamed:@"bg_nav"];//bg_navgation
//    UIEdgeInsets edge  = UIEdgeInsetsMake(0, 0, 0,100);
//    image              = [image resizableImageWithCapInsets:edge resizingMode:UIImageResizingModeStretch];
//
//    [self.navigationBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];
    [self.navigationBar setTintColor:[UIColor blackColor]];
    [self.navigationBar setBackgroundColor:[UIColor whiteColor]];
    [self.navigationBar setBarStyle:UIBarStyleDefault];
    [self.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor blackColor]}];
    [[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(NSIntegerMin, 0) forBarMetrics:UIBarMetricsDefault];
    self.modalPresentationStyle = UIModalPresentationFullScreen;
    
    
}

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
    if (self.viewControllers.count > 0) {
        viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:animated];
}

- (UIViewController *)childViewControllerForStatusBarStyle {
    return self.topViewController;
}



@end
